Iterate()
method of the algorithm.Public fields | ||
convergence | Convergence code. | |
holdF | ||
IIterate | Running on the Client node or no MPI . | |
inparallel | Running in parallel. | |
istr | @internal. | |
iter | current iteration count. | |
itoler | static const | Default top level convergence tolerance. |
logf | log file | |
lognm | const | name of log file |
logpfx | const | prefix on log before timestamp added. |
maxiter | maximum iterations | |
N | . | |
NormalStart | Not restarting from alg. | |
O | const | User's objective. |
path | sequence of structural parameters . | |
StorePath | Store path of iterations in path. | |
tolerance | top level convergence tolerance | |
Volume | output level, NoiseLevels | |
Public methods | ||
Algorithm | Base class for non-linear programming algorithms. | |
CheckPoint | virtual | |
ItEnd | virtual | Finish up iteration. |
Iterate | virtual | |
ItStartCheck | virtual | This routine is called at the start if Iterate(). |
out | virtual | |
Paths | virtual | |
Tune | virtual | Tune Parameters of the Algorithm. |
class MyObjective : BlackBox{ ⋮ // parameters should be declared as members of your class vfunc(subp=DoAll); // you have to define the objective } ⋮ decl myobj = new MyObjective(); ⋮ decl b = new BFGS(myobj); ⋮ b->Iterate();
Public methods | ||
BFGS | Create an object of the BFGS algorithm. | |
Hupdate | virtual | Apply BFGS updating on the Hessian. |
Public methods | ||
BHHH | Create an object of the BHHH algorithm. | |
Hupdate | virtual | UPdate the Hessian for the BHHH algorithm. |
Public methods | ||
Broyden | Create a new Broyden solution for a system of equations. | |
Jupdate | virtual | Apply Broyden's formula to update the Jacobian. |
Public methods | ||
CLineMax | Create a Constrained Line Maximization object. |
Public methods | ||
DFP | Create an object of the DFP algorithm. | |
Hupdate | virtual |
Public fields | ||
cmsg | static const | |
deltaG | |∇m-∇m-1|. | |
deltaX | |xm-xm-1. | |
gradtoler | tolerance for strong convergence. | |
Hresetcnt | # of time H reset to I | |
IamBHHH | BHHH . | |
IamNewt | Newton version . | |
igradtoler | static const | |
LM | const | |
LMitmax | max iterations on line search. | |
LMmaxstep | maximum step size in line search. | |
Public methods | ||
CheckPoint | virtual | Handle gradient based checkpoint files. |
Direction | virtual | Compute the direction for the current line search. |
GradientBased | Initialize a Gradient-Based algorithm. | |
Gupdate | virtual | Update the gradient ∇ f(ψ). |
HHupdate | Update the Hessian Hf. | |
Hupdate | virtual | Default Hessian Update: Steepest Descent, so H f(ψ) does not change. |
Iterate | virtual | Iterate on a gradient-based algorithm. |
ItStartCheck | virtual | This routine is called at the start if Iterate(). |
Tune | virtual | Tune Parameters of the Algorithm. |
Public methods | ||
HillClimbing | Base for Hill Climbing objects. |
Public methods | ||
LineMax | A method to optimize along a line. |
Public fields | ||
Delta | Direction vector. | |
improved | . | |
maxstp | . | |
Public methods | ||
Bracket | Bracket a local maximum along the line. | |
Golden | Golden ratio line search. | |
Iterate | Optimize on a line optimization. | |
LineMethod | ||
PTry | virtual |
class MyObjective : BlackBox{ ⋮ vfunc(subp=DoAll); } ⋮ decl myobj = new MyObjective(); ⋮ decl nm = new NelderMead(myobj); ⋮ nm -> Iterate();
Public fields | ||
alpha | static const | α. |
beta | static const | β. |
fdiff | |f()-mean(f)| | |
gamma | static const | γ. |
istep | static const | default initial step size. |
itoler | static const | default Plexsize tolerance. |
mxstarts | number simplex resets. | |
n_func | function evaluations. | |
nodeV | function values on the simples. | |
nodeX | free parameter simplex. | |
plexsize | current area of plex. | |
step | current step size to create simplex | |
Public methods | ||
CheckPoint | ||
Iterate | Iterate on the Amoeba algorithm. | |
ItStartCheck | ||
NelderMead | Initialize a Nelder-Mead Simplex Maximization. | |
Reflect | Reflect through simplex. | |
SimplexSize | Compute size of the current simplex. | |
Tune | Tune NelderMead Parameters . | |
Enumerations | ||
TryResults | Results from an amoeba try. |
class MyObjective : BlackBox{ ⋮ // parameters should be declared as members of your class vfunc(subp=DoAll); // you have to define the objective } ⋮ decl myobj = new MyObjective(); ⋮ decl newt = new Newton(myobj); ⋮ newt -> Iterate();
Public methods | ||
Hupdate | virtual | Compute the objective's Hessian and the current parameter vector. |
Newton | Create an object of the Newton optimization algorithm. |
Public methods | ||
Jupdate | virtual | Compute the objective's Jacobian. |
NewtonRaphson | Create a Newton-Raphson object to solve a system of equations. |
Public fields | ||
defmxiter | static const | |
istepmin | static const | minimum initial step size. |
itoler | static const | |
Public methods | ||
Bracket | Bracket a root of the equation. | |
EndOneDim | ||
Iterate | Find a 1-dimensional root. | |
OneDimRoot | Object to iterate to find the root a non-linear equation (OneDimSystem). |
Public methods | ||
RandomSearch | Random search without annealing. |
Public fields | ||
dg | ||
USELM | use line search. | |
Public methods | ||
Direction | Compute the direction. | |
Gupdate | Upate Jacobian when using line search aggregation of the system. | |
Iterate | Iterate to solve a non-linear system. | |
ItStartCheck | virtual | This routine is called at the start if Iterate(). |
JJupdate | Wrapper for updating the Jacobian of the system. | |
Jupdate | virtual | Compute the objective's Jacobian. |
RootFinding | Solve a non-linear system of equations. |
class MyObjective : BlackBox{ ⋮ vfunc(subp=DoAll); } ⋮ decl myobj = new MyObjective(); ⋮ decl sa = sa SimulatedAnnealing(myobj); ⋮ sa -> Iterate();
Public fields | ||
accept | ||
chol | cholesky matrix for random parameter change, default I | |
cooling | rate to cool down. | |
heat | current heat default intial =1.0 | |
holdpt | ||
M | ||
shrinkage | rate to shrink variance.default=0.5 | |
tries | ||
Vtries | ||
vtries | ||
Public methods | ||
Iterate | Carry out annealing. | |
Metropolis | accept or reject. | |
SimulatedAnnealing | Initialize Simulated Annealing. | |
Tune | Tune annealing parameters. |
Public fields | ||
BETA | static const | |
ne | ||
ni | ||
Public methods | ||
Gupdate | . | |
HHupdate | . | |
Hupdate | virtual | . |
Iterate | Iterate. | |
SQP | Create a new Sequential Quadratic Programming object. |
Public methods | ||
SQPBFGS |
Public methods | ||
SQPNEWTON |
Public methods | ||
SysMax | A method to optimize along a line. |
O | Objective to work on. A timestamped log file is created for the algorithm when it is created. You can control the output level by setting Volume to the desired NoiseLevels. The default volume level is SILENT. |
Iterate()
ReadCheckPoint | TRUE means starting point coming from the checkpoint file. If running in parallel it is this routine that server nodes go into the server loop. The client node will enter into the main iteration loop. |
maxiter | integer max. number of iterations 0 use current/default value |
toler | double, simplex tolerance for convergence 0 use current/default value |
nfuncmax | integer, number of function evaluations before resetting the simplex 0 use current/default value |
O | the Objective object to apply this algorithm to. |
decl myobj = new MyObjective(); decl bfgs = new BFGS(myobj); bfgs->Iterate();
decl dg = (OC.G - oldG), A = double(dx*dg'), B = double(outer(dx,OC.H)); if (fabs(A) < SQRT_EPS*norm(dg,2)*deltaX ) return FAIL; OC.H += outer(dg,<>,'o')/A - outer(dx*OC.H,<>,'o')/B; return NONE;
FAIL
if the updating tolerances are not met.NONE
O | the Objective object to apply this algorithm to. |
decl myobj = new MyObjective(); decl bhhh = new BHHH(myobj); bhhh->Iterate();
O, | the System-derived object to solve. |
USELM | FALSE [default] do not do a line search each iteration. TRUE |
obj = new MyObjective(); broy = new Broyden(obj); broy -> Iterate();
dx | xt+1 - xt |
O | Objective |
O | the Objective object to apply this algorithm to. |
decl myobj = new MyObjective(); decl dfp = new DFP(myobj); bfgs->Iterate();
WriteOut | TRUE - write modeFALSE read from file mode |
norm(m,2)
routine.QUIET
∇ f() is printed to the screen.FORCE | see below.
FORCE is TRUE, call Gupdate() and check both
STRONG and WEAK convergence criteria.Hupdate() routine. |
Hupdate()
NONE
ReadCheckPoint | TRUE means starting point coming from the checkpoint file. If running in parallel it is this routine that server nodes go into the server loop. The client node will enter into the main iteration loop. |
maxiter | integer max. number of iterations 0 use current/default value |
toler | double, simplex tolerance for convergence 0 use current/default value |
nfuncmax | integer, number of function evaluations before resetting the simplex 0 use current/default value |
LMitmax | integer, max number of line maximization iterions 0 use current/default value |
LMmaxstep | double, maximum change in line maximization |
O | Objective |
Delta | vector of directions to define the line |
maxiter | > 0 max. number iterations 0 set to 1000 |
maxstp | > 0, maximum step size in parameters. |
Enumerations | ||
TryResults | Results from an amoeba try. | hi, nxtlo, lo, worst, TryResults |
iplex | N×N+1 matrix of initial steps. double, initial step size (iplex is set to 0~unit(N)) integer > 0, max starts of the algorithm 0 (default), use current mxstarts. = -1 (UseGradient), compute gradient and use its normed value as initial simplex = -2 (UseCheckPoint), read in checkpoint file to return to last state. |
O | Objective to work on. |
fac | factor |
mxstarts | integer number of simplex restarts 0 use current/default value |
toler | double, simplex tolerance for convergence 0 use current/default value |
nfuncmax | integer, number of function evaluations before resetting the simplex 0 use current/default value |
maxiter | integer max. number of iterations 0 use current/default value |
NONE
O | the Objective object to apply this algorithm to. |
decl myobj = new MyObjective(); decl newt = new Newtown(myobj); newt->Iterate();
O, | the System-derived object to solve. |
USELM | FALSE [default] do not do a line search each iteration. TRUE |
obj = new MyObjective(); nr = new NewtonRaphson(obj); hr -> Iterate();
istep | initial step, can be positive or negative [default=1.0] |
maxiter | > 0 max. number iterations > 0 [default=50] |
toler | > 0 tolerance 0 [default=SSQ_TOLER] This uses the fact that vcur.v contains the norm of the equation, not the negative, |
J | matrix, initial Jacobian for Broyden. integer, set to identity This routine is shared (inherited) by derived algorithms. |
ReadCheckPoint | TRUE means starting point coming from the checkpoint file. If running in parallel it is this routine that server nodes go into the server loop. The client node will enter into the main iteration loop. |
FAIL
if change in parameter values is too small.
Otherwise, return NONE
dx | argument is ignored (default=0) |
O | System object |
USELM | FALSE [default] do not do a line search each iteration. TRUE |
chol | Determines the Choleski matrix for random draws, C 0 [default] \(C = I\), the identity matrix matrix, \(C = \) chol. double, common standard deviation, \(C = chol I\). |
O | Objective to work on. |
maxiter | > 0, number of iterations 0 do not change |
heat | > 0, temperature parameter 0 do not change |
cooling | ∈ (0,1], rate to cool, 0 do not change |
shrinkage | ∈ (0,1], rate to shrink, 0 do not change |
H | initial Hessian integer, use I |
O | Constrained objective |
O | Objective |